<!--<div class="page-header">
    <h1>
        消费者
    </h1>
</div>&lt;!&ndash; /.page-header &ndash;&gt;-->
<div class="row" >
    <div class="col-xs-12">
        <!-- PAGE CONTENT BEGINS -->

        <div class="table-responsive">
        <div>
        <button type="button" class="btn btn-info btn-xs" ng-click="statements()">结算</button>
                   结算方名称:<input type="text" ng-model="sresult.settlementTargetName" style="width:130px;margin-right:25px;"  > 
                  状态: <select ng-model="sresult.settlementStatus"  style="margin-right:15px;" >
                   <option value="0">全部</option>
                   <option value="1">未结算</option>
                   <option value="2">已结算</option>
              </select>
                  收/支: <select ng-model="sresult.settlementCategory" style="margin-right:15px;" >
                   <option value="0">全部</option>
                   <option value="1">收入</option>
                   <option value="-1">支出</option>
              </select>   
                销售类型: <select ng-model="sresult.saleType" style="margin-right:15px;" >
                   <option value="0">全部</option>
                   <option value="1">一般订单</option>
                   <option value="2">今夜特价</option>
              </select>                
                         
       <button type="button" class="btn btn-info btn-xs" ng-click="search1()">查询</button>
       <button type="button" class="btn btn-info btn-xs" ng-click="export1(false)">导出全部</button>
       <button type="button" class="btn btn-info btn-xs" ng-click="export1(true)">导出本页</button>
        </div>         
            <table  id="table1" class="table table-bordered table-hover"  style="margin-top:10px;">
                <tr>
			       <th><input type="checkbox" name="all" id="all" /> </th>
			        <th style="width:100px;">结算方名称</th>
			        <th>费用类型</th>
			        <th>结算总金额</th>
			        <th>折扣后总金额</th>
			        <th>状态</th>
			        <th>结算类型</th>
			        <th>收/支</th>
			        <th>销售类型</th>
			        <th style="width:160px;">起始日期</th>
			        <th style="width:160px;">截止日期</th>
			        <th style="width:160px;">创建时间</th>
			        <th>操作</th>
			    </tr>
                <tr ng-repeat="item in lists">
                    <td>    
                     <div ng-show="{{item.settlementStatus}}==1">
                        <input type="checkbox" name="check" value="{{item.id}}" /> 
                     </div>
                    </td>
                    <td>{{item.settlementTargetName}}</td>
                    <td>{{item.strFeeType}}</td>
		            <td>{{item.settlementTotalSum}}</td>
		            <td>{{item.settlementSaleSum}}</td>
		            <td>{{item.strSettlementStatus}}</td>
		            <td>{{item.strSettlementType}}</td>
		            <td>{{item.strSettlementCategory}}</td>
		            <td>{{item.strSaleType}}</td>
		            <td>{{item.strSettlementBeginTime}}</td>
		            <td>{{item.strSettlementEndTime}}</td>
		            <td>{{item.strCreateTime}} </td>
		             <td>
                        <button type="button" class="btn btn-info btn-xs" ng-click="reSettlement(item)">重新结算</button>
                    </td>
                </tr>
            </table>
        </div><!-- /.table-responsive -->
        <span>
            <pagination ng-change="pageChanged()" items-per-page="itempersize" direction-links="false" boundary-links="true" total-items="totalItems" ng-model="currentPage" first-text="首页" last-text="末页" previous-text="上一页" next-text="下一页"></pagination>
         </span>  
<!--          <span  style="margin-top: 1cm;"> -->
<!--                                 共查询到{{totalItems}}条数据 -->
<!--          </span>          -->
    
    </div><!-- /.col -->
</div><!-- /.row -->
<script type="text/javascript">
$(function() {
    var all_checked = false;
    $(":checkbox").click(function() {
        var table = $(this).parents("table");
         //如果点击了全选的，那么下面都选或者不选
        if($(this).attr("id") === "all") {
            table.find(":checkbox").prop("checked", !all_checked);
            all_checked = !all_checked;
        } else {
            table.find(":checkbox[id!=all]").each(function (i) {
                if(!$(this).is(":checked")) {
                    table.find("#all").prop("checked", false);
                    all_checked = false;
                    return false;
                }
                $("#all").prop("checked", true);
                all_checked = true;
            });
        }
    });
    
});
</script>
